#include<stdio.h>
int main()
{
  int N;
  scanf("%d",&N);
   double S=0,t=1,mu=1;
   for(int i=1;i<=N;i++)
   {
     S=S+(1/mu)*t; 
    mu = mu+3;
    t=-t;
    

   }
   printf("sum = %.3lf",S);


return 0;
}

